import App from './App'
import store from './sheep/store'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import showToast from './sheep/utils/toast'
import uView from 'uview-ui'
import { getImgUrl } from './sheep/utils/common'

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  store,
  ...App
})
app.$mount()
// #endif

// 引入uview
Vue.use(uView)
//全局挂载toast
Vue.prototype.$toast = showToast
//全局挂载获取图片地址方法
Vue.prototype.getImgUrl = getImgUrl

// 引入请求封装，将app参数传递到配置中
require('./sheep/request/index')(app)

// 全局分享
const $x = {};
Vue.prototype.$x = $x;
let share = require('./sheep/utils/share');
Vue.mixin(share);

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif